Skip to content

Add flake-follows hook#723

Open
klarkc wants to merge 13 commits into
cachix:masterfrom
klarkc:add-flake-follows-hook
Open

Add flake-follows hook#723
klarkc wants to merge 13 commits into
cachix:masterfrom
klarkc:add-flake-follows-hook

Conversation

@klarkc

@klarkc klarkc commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • add a hooks.flake-follows hook backed by flake-edit follow
  • expose a-kenji/flake-edit in the git-hooks tool set
  • add hook config and behavior tests for the new hook

Motivation

flake-edit follow mutates flake.nix by adding missing follows declarations. That makes it a good fit for a pre-commit hook: it is a repository hygiene action.

Testing

Tested locally on x86_64-linux:

nix eval --show-trace --file ./default.nix run
nix build .#checks.x86_64-linux.hook-config-test
nix build .#checks.x86_64-linux.flake-follows-test
cd dev
nix flake check -L --show-trace --no-write-lock-file
nix flake check -L --show-trace \
  --override-input git-hooks/nixpkgs github:NixOS/nixpkgs/nixos-25.11

klarkc added a commit to klarkc/dotfiles that referenced this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant